<?php
/**
 * 后台登陆输入信息
 */
namespace APP\PUT;



class Editurl extends \SF\Input
{
	public function init()
	{
	    // id
		$this->addItem('uid', array(
            'reflection' => 'id',
		    'filters'         => array('int'),
		    'validators'	 => array(
                array('validator'=>'notEmpty', 'message'=>'修改出错，请刷新重试')
		    ),
		));

	    // 链接
		$this->addItem('url', array(
		    'filters'         => array('stringTrim', 'deQuote'),
		    'validators'	 => array(
                array('validator'=>'notEmpty', 'message'=>'网址链接不能为空'),
		        array('validator'=>'isUrl', 'message'=>'网址链接格式有误')
		    ),
		));
		
		// 标题
		$this->addItem('title', array(
		    'filters'		=> array('stringTrim', 'deQuote'),
		    'validators'	=> array(
		        array('validator'=>'notEmpty', 'message'=>'网址标题不能为空')
		    ),
		));

		// 分类
		$this->addItem('intro', array(
		    'filters'		=> array('stringTrim', 'deQuote')
		));
	}
}